/*
 * Copyright (c) 2013 WDCY Information Technology Co. Ltd
 * www.wdcy.cc
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * WDCY Information Technology Co. Ltd ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with WDCY Information Technology Co. Ltd.
 */
package com.monkey.web.dto.response.monitor;

import com.monkey.core.web.response.MonkeyResponseDto;
import org.hibernate.stat.Statistics;

/**
 * @author Wu Tianqiang
 */
public class SystemStatusResponseJSONDto extends MonkeyResponseDto {

    private long transactionCount;
    private long successfulTransactionCount;

    private long connectCount;
    private long prepareStatementCount;
    private long closeStatementCount;
    private long optimisticFailureCount;

    private long sessionOpenCount;
    private long sessionCloseCount;
    private long flushCount;

    private long entityDeleteCount;
    private long entityInsertCount;
    private long entityUpdateCount;
    private long entityLoadCount;
    private long entityFetchCount;

    private long collectionRemoveCount;
    private long collectionInsertCount;
    private long collectionUpdateCount;
    private long collectionLoadCount;
    private long collectionFetchCount;
    private long collectionRecreateCount;

    public SystemStatusResponseJSONDto(Statistics statistics) {
        this.transactionCount = statistics.getTransactionCount();
        this.successfulTransactionCount = statistics.getSuccessfulTransactionCount();

        this.connectCount = statistics.getConnectCount();
        this.prepareStatementCount = statistics.getPrepareStatementCount();
        this.closeStatementCount = statistics.getCloseStatementCount();
        this.optimisticFailureCount = statistics.getOptimisticFailureCount();

        this.sessionOpenCount = statistics.getSessionOpenCount();
        this.sessionCloseCount = statistics.getSessionCloseCount();
        this.flushCount = statistics.getFlushCount();

        this.entityDeleteCount = statistics.getEntityDeleteCount();
        this.entityInsertCount = statistics.getEntityInsertCount();
        this.entityUpdateCount = statistics.getEntityUpdateCount();
        this.entityLoadCount = statistics.getEntityLoadCount();
        this.entityFetchCount = statistics.getEntityFetchCount();

        this.collectionRemoveCount = statistics.getCollectionRemoveCount();
        this.collectionInsertCount = statistics.getEntityInsertCount();
        this.collectionUpdateCount = statistics.getCollectionUpdateCount();
        this.collectionLoadCount = statistics.getCollectionLoadCount();
        this.collectionFetchCount = statistics.getCollectionFetchCount();
        this.collectionRecreateCount = statistics.getCollectionRecreateCount();

    }

    public long getEntityDeleteCount() {
        return entityDeleteCount;
    }

    public void setEntityDeleteCount(long entityDeleteCount) {
        this.entityDeleteCount = entityDeleteCount;
    }

    public long getEntityInsertCount() {
        return entityInsertCount;
    }

    public void setEntityInsertCount(long entityInsertCount) {
        this.entityInsertCount = entityInsertCount;
    }

    public long getEntityUpdateCount() {
        return entityUpdateCount;
    }

    public void setEntityUpdateCount(long entityUpdateCount) {
        this.entityUpdateCount = entityUpdateCount;
    }

    public long getEntityLoadCount() {
        return entityLoadCount;
    }

    public void setEntityLoadCount(long entityLoadCount) {
        this.entityLoadCount = entityLoadCount;
    }

    public long getEntityFetchCount() {
        return entityFetchCount;
    }

    public void setEntityFetchCount(long entityFetchCount) {
        this.entityFetchCount = entityFetchCount;
    }

    public long getCollectionRemoveCount() {
        return collectionRemoveCount;
    }

    public void setCollectionRemoveCount(long collectionRemoveCount) {
        this.collectionRemoveCount = collectionRemoveCount;
    }

    public long getCollectionInsertCount() {
        return collectionInsertCount;
    }

    public void setCollectionInsertCount(long collectionInsertCount) {
        this.collectionInsertCount = collectionInsertCount;
    }

    public long getCollectionUpdateCount() {
        return collectionUpdateCount;
    }

    public void setCollectionUpdateCount(long collectionUpdateCount) {
        this.collectionUpdateCount = collectionUpdateCount;
    }

    public long getCollectionLoadCount() {
        return collectionLoadCount;
    }

    public void setCollectionLoadCount(long collectionLoadCount) {
        this.collectionLoadCount = collectionLoadCount;
    }

    public long getCollectionFetchCount() {
        return collectionFetchCount;
    }

    public void setCollectionFetchCount(long collectionFetchCount) {
        this.collectionFetchCount = collectionFetchCount;
    }

    public long getCollectionRecreateCount() {
        return collectionRecreateCount;
    }

    public void setCollectionRecreateCount(long collectionRecreateCount) {
        this.collectionRecreateCount = collectionRecreateCount;
    }

    public long getTransactionCount() {
        return transactionCount;
    }

    public void setTransactionCount(long transactionCount) {
        this.transactionCount = transactionCount;
    }

    public long getSuccessfulTransactionCount() {
        return successfulTransactionCount;
    }

    public void setSuccessfulTransactionCount(long successfulTransactionCount) {
        this.successfulTransactionCount = successfulTransactionCount;
    }

    public long getConnectCount() {
        return connectCount;
    }

    public void setConnectCount(long connectCount) {
        this.connectCount = connectCount;
    }

    public long getPrepareStatementCount() {
        return prepareStatementCount;
    }

    public void setPrepareStatementCount(long prepareStatementCount) {
        this.prepareStatementCount = prepareStatementCount;
    }

    public long getCloseStatementCount() {
        return closeStatementCount;
    }

    public void setCloseStatementCount(long closeStatementCount) {
        this.closeStatementCount = closeStatementCount;
    }

    public long getOptimisticFailureCount() {
        return optimisticFailureCount;
    }

    public void setOptimisticFailureCount(long optimisticFailureCount) {
        this.optimisticFailureCount = optimisticFailureCount;
    }

    public long getSessionOpenCount() {
        return sessionOpenCount;
    }

    public void setSessionOpenCount(long sessionOpenCount) {
        this.sessionOpenCount = sessionOpenCount;
    }

    public long getSessionCloseCount() {
        return sessionCloseCount;
    }

    public void setSessionCloseCount(long sessionCloseCount) {
        this.sessionCloseCount = sessionCloseCount;
    }

    public long getFlushCount() {
        return flushCount;
    }

    public void setFlushCount(long flushCount) {
        this.flushCount = flushCount;
    }
}